package com.wjw.openclosed.openclosed01;

/**
 * TODO: 描述
 *
 * @author ikaros
 * @date 2024/7/9 0:48
 * @see <a href="ikaros@qq.com">mailTo: ikaros@qq.com</a>
 */
public class Client {
    public static void main(String[] args) {
        Client client = new Client();
        client.useDb("oracle");
    }

    public void useDb(String dataBase){
        if ("mysql".equals(dataBase)) {
            Mysql mysql = new Mysql();
            mysql.query();
        } else if ("oracle".equals(dataBase)) {
            Oracle oracle = new Oracle();
            oracle.query();
        }
    }
}
